home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr37 / satsfaxt.zip / CCPUTILS.ZIP / HELP.C < prev    next >
Text File  |  1990-01-30  |  3KB  |  56 lines

  1. /*===========================================================================*
  2.  *                                                                           *
  3.  *                                   HELP.C                                  *
  4.  *                                                                           *
  5.  *---------------------------------------------------------------------------*
  6.  *                                                                           *
  7.  *  This function prints a help message about the command that called it.    *
  8.  *  The information is defined in a help table in the calling application.   *
  9.  *  After displaying the information, the program exits without returning    *
  10.  *  to the caller. The exit code is 0 when returning thru the help function. *
  11.  *                                                                           *
  12.  *  The following source code is intended to assist developers in            *
  13.  *  creating applications which support the  DCA/Intel Communicating         *
  14.  *  Applications Specification Version 1.0A. It is provided free of charge   *
  15.  *  and on an as-is basis. THE IMPLIED WARRENTIES OF MERCHANTABILITY AND     *
  16.  *  FITNESS FOR A PARTICULAR PURPOSE ARE SPECIFICALLY EXCLUDED. This source  *
  17.  *  code may be modified, enhanced, copied and distributed with applications *
  18.  *  that support CAS on a royalty free basis.                                *
  19.  *                                                                           *
  20.  *---------------------------------------------------------------------------*
  21.  *                                                                           *
  22.  *  HISTORY:                                                                 *
  23.  *          - completed 9/14/89.                                             *
  24.  *                                                                           *
  25.  *===========================================================================*/
  26.  
  27. #include <stdio.h>
  28. #include <dos.h>
  29. #include "cas.h"
  30. #include "util.h"
  31.  
  32. /*---------------------------------------------------------------------------*
  33.  *                                  CASHelp                                  *
  34.  *---------------------------------------------------------------------------*
  35.  *  CASHelp displays a description and the syntax of the calling utility,    *
  36.  *  as well as a list of command-line switches.                              *
  37.  *---------------------------------------------------------------------------*
  38.  *  INPUT :  description string, syntax string, the switch help table, and   *
  39.  *           its size.                                                       *
  40.  *  OUTPUT:  none                                                            *
  41.  *---------------------------------------------------------------------------*/
  42. void CASHelp(char *DescTable[], int dSize, char *HelpTable[], int hSize)
  43. {
  44.     int x;
  45.  
  46.     for(x = 0; x < dSize; x++) {
  47.         fprintf(stdout, "%s", DescTable[x]);
  48.     }
  49.     for(x = 0; x < hSize; x++) {
  50.         fprintf(stdout, "%s", HelpTable[x]);
  51.     }
  52.  
  53.     exit(0);
  54.  
  55. }
  56.